/**
 * Copyright (c) 2015-2020, wss 王山山
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.wss.utils.scan;

import java.util.List;

/**
 * 扫描类文件
 * 
 * @author wss
 *
 */
interface ScanClasses {
	/**
	 * 判断是否是类文件
	 * 
	 * @param str	类文件名
	 * @return		true: 是类文件; false: 不是类文件
	 */
	default public boolean isClassFile(String str) {
		return str.endsWith(ScanUtil.CLASS_FILE_SUFFIX);
	}
	
	/**
	 * 扫描指定包下的类
	 * 
	 * @param filePath 			包名对应的绝对路径
	 * @param packageName		路径形式的包名，如: com/wss/utils
	 * @return					类名集合
	 */
	public List<String> scanPackage(String filePath, String packageName);
	
	/**
	 * 递归扫描指定包及其子包下的类
	 * 
	 * @param filePath 			包名对应的绝对路径
	 * @param packageName		路径形式的包名，如: com/wss/utils
	 * @return					类名集合
	 */
	public List<String> scanPackageRecursive(String filePath, String packageName);
}
